package com.obm.fa.dao;

import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;

import com.obm.fa.R;
import com.obm.fa.bean.FileFormat;
import com.obm.fa.ui.BaseApplication;

import java.util.ArrayList;
import java.util.List;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.Property;
import de.greenrobot.dao.internal.DaoConfig;

import static com.obm.fa.R.string.user_name;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** 
 * DAO for table "FILE_FORMAT".
*/
public class FileFormatDao extends AbstractDao<FileFormat, Long> {
    Context context;

    public static final String TABLENAME = "FILE_FORMAT";

    public static class FileProperties{
        public static final  String FILETYPE = "FILETYPE";
        public static final  String SEPARATER = "SEPARATER";
        public static final  String HASTITLE = "HASTITLE";
        public static final  String QUOTE = "QUOTE";
        public static final  String NUMBEREXCEPT = "NUMBEREXCEPT";
        public static final  String ALLOWNULL = "ALLOWNULL";
        public static final  String FIXEDSEPARATER = "FIXEDSEPARATER";

        public static final  String CONDITION = "CONDITION";
        public static final  String NUMBERDIGIT = "NUMBERDIGIT";
        public static final  String SELECTCONSEPARATE = "CONSEPARATE";
    }

    public static class FilePropertieValues {
        public static final String SEPARATERCOMMA = ",";
        public static final String SEPARATERAffiliate = ";";
        public static final String SEPARATERTAB = "Tab";
        public static final String SEPARATERFASTENLEN = "Fixed";
        public static final String SEPARATERRETURN = "CR";


        public static final char SEPARATERFASTENChar = 'F';
    }

    public static class FileFormats {
        public static final String FILETYPEEXCEL = "XLS";
        public static final String FILETYPECSV = "CSV";
        public static final String FILETYPETXT = "TXT";
        public static final String FILETYPEXML = "XML";
        public static final String FILETYPEWPSET = "WPS ET";
        public static final String FILETYPEDBF = "DBF";
    }

    /**
     * Properties of entity FileFormat.<br/>
     * Can be used for QueryBuilder and for referencing column names.
    */
    public static class Properties {
        public final static Property Id = new Property(0, Long.class, "id", true, "ID");
        public final static Property Ctype = new Property(1, String.class, "ctype", false, "CTYPE");
        public final static Property Nseqno = new Property(2, Integer.class, "nseqno", false, "NSEQNO");
        public final static Property CfieldName = new Property(3, String.class, "cfieldName", false, "CFIELD_NAME");
        public final static Property CdisplayName = new Property(4, String.class, "cdisplayName", false, "CDISPLAY_NAME");
        public final static Property Bdisplayflag = new Property(5, String.class, "bdisplayflag", false, "BDISPLAYFLAG");
        public final static Property BDataFlag = new Property(6, String.class, "bDataFlag", false, "B_DATA_FLAG");
        public final static Property Ctitle = new Property(7, String.class, "ctitle", false, "CTITLE");
        public final static Property Bimportflag = new Property(8, String.class, "bimportflag", false, "BIMPORTFLAG");
        public final static Property Nimportno = new Property(9, Integer.class, "nimportno", false, "NIMPORTNO");
        public final static Property NimportLen = new Property(10, Integer.class, "nimportLen", false, "NIMPORT_LEN");
        public final static Property Bexportflag = new Property(11, String.class, "bexportflag", false, "BEXPORTFLAG");
        public final static Property Nexportno = new Property(12, Integer.class, "nexportno", false, "NEXPORTNO");
        public final static Property NexportLen = new Property(13, Integer.class, "nexportLen", false, "NEXPORT_LEN");
        public final static Property BisNumber = new Property(14, String.class, "bisNumber", false, "BIS_NUMBER");
        public final static Property CCustField = new Property(15, String.class, "cCustField", false, "C_CUST_FIELD");
        public final static Property CFormatStr = new Property(16, String.class, "cFormatStr", false, "C_FORMAT_STR");
        public final static Property COperator = new Property(17, String.class, "cOperator", false, "C_OPERATOR");
        public final static Property Creduced = new Property(18, String.class, "creduced", false, "CREDUCED");
    };

    private DaoSession daoSession;


    public FileFormatDao(DaoConfig config) {
        super(config);
    }
    
    public FileFormatDao(DaoConfig config, DaoSession daoSession) {
        super(config, daoSession);
        this.daoSession = daoSession;
    }

    /** Creates the underlying database table. */
    public static void createTable(SQLiteDatabase db, boolean ifNotExists) {
        String constraint = ifNotExists? "IF NOT EXISTS ": "";
        db.execSQL("CREATE TABLE " + constraint + "\"FILE_FORMAT\" (" + //
                "\"ID\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id
                "\"CTYPE\" TEXT," + // 1: ctype
                "\"NSEQNO\" INTEGER," + // 2: nseqno
                "\"CFIELD_NAME\" TEXT," + // 3: cfieldName
                "\"CDISPLAY_NAME\" TEXT," + // 4: cdisplayName
                "\"BDISPLAYFLAG\" TEXT," + // 5: bdisplayflag
                "\"B_DATA_FLAG\" TEXT," + // 6: bDataFlag
                "\"CTITLE\" TEXT," + // 7: ctitle
                "\"BIMPORTFLAG\" TEXT," + // 8: bimportflag
                "\"NIMPORTNO\" INTEGER," + // 9: nimportno
                "\"NIMPORT_LEN\" INTEGER," + // 10: nimportLen
                "\"BEXPORTFLAG\" TEXT," + // 11: bexportflag
                "\"NEXPORTNO\" INTEGER," + // 12: nexportno
                "\"NEXPORT_LEN\" INTEGER," + // 13: nexportLen
                "\"BIS_NUMBER\" TEXT," + // 14: bisNumber
                "\"C_CUST_FIELD\" TEXT," + // 15: cCustField
                "\"C_FORMAT_STR\" TEXT," + // 16: cFormatStr
                "\"C_OPERATOR\" TEXT," + // 17: cOperator
                "\"CREDUCED\" TEXT);"); // 18: creduced
        // Add Indexes
        db.execSQL("CREATE INDEX " + constraint + "IDX_FILE_FORMAT_CTYPE ON FILE_FORMAT" +
                " (\"CTYPE\");");
    }

    /** Drops the underlying database table. */
    public static void dropTable(SQLiteDatabase db, boolean ifExists) {
        String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"FILE_FORMAT\"";
        db.execSQL(sql);
    }

    /** @inheritdoc */
    @Override
    protected void bindValues(SQLiteStatement stmt, FileFormat entity) {
        stmt.clearBindings();
 
        Long id = entity.getId();
        if (id != null) {
            stmt.bindLong(1, id);
        }
 
        String ctype = entity.getCtype();
        if (ctype != null) {
            stmt.bindString(2, ctype);
        }
 
        Integer nseqno = entity.getNseqno();
        if (nseqno != null) {
            stmt.bindLong(3, nseqno);
        }
 
        String cfieldName = entity.getCfieldName();
        if (cfieldName != null) {
            stmt.bindString(4, cfieldName);
        }
 
        String cdisplayName = entity.getCdisplayName();
        if (cdisplayName != null) {
            stmt.bindString(5, cdisplayName);
        }
 
        String bdisplayflag = entity.getBdisplayflag();
        if (bdisplayflag != null) {
            stmt.bindString(6, bdisplayflag);
        }
 
        String bDataFlag = entity.getBDataFlag();
        if (bDataFlag != null) {
            stmt.bindString(7, bDataFlag);
        }
 
        String ctitle = entity.getCtitle();
        if (ctitle != null) {
            stmt.bindString(8, ctitle);
        }
 
        String bimportflag = entity.getBimportflag();
        if (bimportflag != null) {
            stmt.bindString(9, bimportflag);
        }
 
        Integer nimportno = entity.getNimportno();
        if (nimportno != null) {
            stmt.bindLong(10, nimportno);
        }
 
        Integer nimportLen = entity.getNimportLen();
        if (nimportLen != null) {
            stmt.bindLong(11, nimportLen);
        }
 
        String bexportflag = entity.getBexportflag();
        if (bexportflag != null) {
            stmt.bindString(12, bexportflag);
        }
 
        Integer nexportno = entity.getNexportno();
        if (nexportno != null) {
            stmt.bindLong(13, nexportno);
        }
 
        Integer nexportLen = entity.getNexportLen();
        if (nexportLen != null) {
            stmt.bindLong(14, nexportLen);
        }
 
        String bisNumber = entity.getBisNumber();
        if (bisNumber != null) {
            stmt.bindString(15, bisNumber);
        }
 
        String cCustField = entity.getCCustField();
        if (cCustField != null) {
            stmt.bindString(16, cCustField);
        }
 
        String cFormatStr = entity.getCFormatStr();
        if (cFormatStr != null) {
            stmt.bindString(17, cFormatStr);
        }
 
        String cOperator = entity.getCOperator();
        if (cOperator != null) {
            stmt.bindString(18, cOperator);
        }
 
        String creduced = entity.getCreduced();
        if (creduced != null) {
            stmt.bindString(19, creduced);
        }
    }

    @Override
    protected void attachEntity(FileFormat entity) {
        super.attachEntity(entity);
        entity.__setDaoSession(daoSession);
    }

    /** @inheritdoc */
    @Override
    public Long readKey(Cursor cursor, int offset) {
        return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0);
    }    

    /** @inheritdoc */
    @Override
    public FileFormat readEntity(Cursor cursor, int offset) {
        FileFormat entity = new FileFormat( //
            cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
            cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // ctype
            cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // nseqno
            cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // cfieldName
            cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // cdisplayName
            cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // bdisplayflag
            cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // bDataFlag
            cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // ctitle
            cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // bimportflag
            cursor.isNull(offset + 9) ? null : cursor.getInt(offset + 9), // nimportno
            cursor.isNull(offset + 10) ? null : cursor.getInt(offset + 10), // nimportLen
            cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11), // bexportflag
            cursor.isNull(offset + 12) ? null : cursor.getInt(offset + 12), // nexportno
            cursor.isNull(offset + 13) ? null : cursor.getInt(offset + 13), // nexportLen
            cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14), // bisNumber
            cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15), // cCustField
            cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16), // cFormatStr
            cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17), // cOperator
            cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18) // creduced
        );
        return entity;
    }
     
    /** @inheritdoc */
    @Override
    public void readEntity(Cursor cursor, FileFormat entity, int offset) {
        entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
        entity.setCtype(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
        entity.setNseqno(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
        entity.setCfieldName(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
        entity.setCdisplayName(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
        entity.setBdisplayflag(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
        entity.setBDataFlag(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6));
        entity.setCtitle(cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7));
        entity.setBimportflag(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8));
        entity.setNimportno(cursor.isNull(offset + 9) ? null : cursor.getInt(offset + 9));
        entity.setNimportLen(cursor.isNull(offset + 10) ? null : cursor.getInt(offset + 10));
        entity.setBexportflag(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11));
        entity.setNexportno(cursor.isNull(offset + 12) ? null : cursor.getInt(offset + 12));
        entity.setNexportLen(cursor.isNull(offset + 13) ? null : cursor.getInt(offset + 13));
        entity.setBisNumber(cursor.isNull(offset + 14) ? null : cursor.getString(offset + 14));
        entity.setCCustField(cursor.isNull(offset + 15) ? null : cursor.getString(offset + 15));
        entity.setCFormatStr(cursor.isNull(offset + 16) ? null : cursor.getString(offset + 16));
        entity.setCOperator(cursor.isNull(offset + 17) ? null : cursor.getString(offset + 17));
        entity.setCreduced(cursor.isNull(offset + 18) ? null : cursor.getString(offset + 18));
     }
    
    /** @inheritdoc */
    @Override
    protected Long updateKeyAfterInsert(FileFormat entity, long rowId) {
        entity.setId(rowId);
        return rowId;
    }
    
    /** @inheritdoc */
    @Override
    public Long getKey(FileFormat entity) {
        if(entity != null) {
            return entity.getId();
        } else {
            return null;
        }
    }

    /** @inheritdoc */
    @Override    
    protected boolean isEntityUpdateable() {
        return true;
    }


    public List<FileFormat> addExportData() {
        context= BaseApplication.getInstance().getApplicationContext();

        ArrayList<FileFormat> entityList = new ArrayList<FileFormat>();
        FileFormat lobj = null;
        long id = 1;
        int seqno ;

        seqno = 1;
        lobj = new FileFormat(id++, "EXPORT", seqno++, "Barcode", getString(R.string.Barcode), "Y", "Y", getString(R.string.Barcode),"N", 0, 0, "Y", 1, 0,  "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "Name", getString(R.string.Name), "Y", "Y", getString(R.string.Name),"N", 0, 0, "Y", 2, 0,  "N", "", "", "", "");
        entityList.add(lobj);


        lobj = new FileFormat(id++, "EXPORT", seqno++, "spec", context.getString(R.string.spec), "Y", "Y", context.getString(R.string.spec), "N", 0, 0,"Y", 3, 0,  "Y", "", "", "", "");
        entityList.add(lobj);



        lobj = new FileFormat(id++, "EXPORT", seqno++, "unit", context.getString(R.string.unit), "Y", "Y", context.getString(R.string.unit), "N", 0, 0,"Y", 4, 0,  "D", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "class_no", context.getString(R.string.class_no), "Y", "Y", context.getString(R.string.class_no), "N", 0, 0,"Y", 5, 0,  "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "class_name", context.getString(R.string.class_name), "Y", "Y", context.getString(R.string.class_name), "N", 0, 0, "Y", 6, 0, "Y", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORT", seqno++, "brand_no", context.getString(R.string.brand_no), "Y", "Y", context.getString(R.string.brand_no), "N", 0, 0, "N", 7, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORT", seqno++, "brand_name", context.getString(R.string.brand_name), "Y", "Y", context.getString(R.string.brand_name), "N", 0, 0, "N", 8, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORT", seqno++, "supcust_no", context.getString(R.string.supcust_no), "Y", "Y", context.getString(R.string.supcust_no), "N", 0, 0, "N", 9, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORT", seqno++, "supcust_name", context.getString(R.string.supcust_name), "Y", "Y", context.getString(R.string.supcust_name), "N", 0, 0, "N", 10, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "dept_no", context.getString(R.string.asset_dept_no), "Y", "Y", context.getString(R.string.asset_dept_no), "N", 0, 0, "N", 11, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "dept_name", context.getString(R.string.asset_dept_name), "Y", "Y", context.getString(R.string.asset_dept_name), "N", 0, 0, "N", 12, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "user_no", context.getString(R.string.asset_user_no), "Y", "Y", context.getString(R.string.asset_user_no), "N", 0, 0, "N", 13, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "user_name", context.getString(R.string.asset_user_name), "Y", "Y", context.getString(R.string.asset_user_name), "N", 0, 0, "N", 14, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "location", context.getString(R.string.asset_location), "Y", "Y", context.getString(R.string.asset_location), "N", 0, 0, "N", 15, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "pay_date", context.getString(R.string.pay_date), "Y", "Y", context.getString(R.string.pay_date), "N", 0, 0, "N", 16, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "use_date", context.getString(R.string.use_date), "Y", "Y", context.getString(R.string.use_date), "N", 0, 0, "N", 17, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "retire_date", context.getString(R.string.retire_date), "Y", "Y", context.getString(R.string.retire_date), "N", 0, 0, "N", 18, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "pay_price", context.getString(R.string.pay_price), "Y", "Y", context.getString(R.string.pay_price), "N", 0, 0, "N", 19, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "now_price", context.getString(R.string.now_price), "Y", "Y", context.getString(R.string.now_price), "N", 0, 0, "N", 20, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "stock_qty", context.getString(R.string.stock_qty), "Y", "Y", context.getString(R.string.stock_qty), "N", 0, 0, "N", 21, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "period", context.getString(R.string.period), "Y", "Y", context.getString(R.string.period), "N", 0, 0, "N", 22, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "remark", context.getString(R.string.asset_remark), "Y", "Y", context.getString(R.string.asset_remark), "N", 0, 0, "N", 23, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "Operator", context.getString(R.string.Operator), "Y", "Y", context.getString(R.string.Operator), "N", 0, 0, "N", 24, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "OPtime", context.getString(R.string.OPtime), "Y", "Y", context.getString(R.string.OPtime), "N", 0, 0, "N", 25, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "check_qty", context.getString(R.string.check_qty), "Y", "Y", context.getString(R.string.check_qty), "N", 0, 0, "N", 26, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "retire_qty", context.getString(R.string.retire_qty), "Y", "Y", context.getString(R.string.retire_qty), "N", 0, 0, "N", 27, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "re_dept_name", context.getString(R.string.re_dept_name), "Y", "Y", context.getString(R.string.re_dept_name), "N", 0, 0, "N", 28, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "re_user_no", context.getString(R.string.re_user_no), "Y", "Y", context.getString(R.string.re_user_no), "N", 0, 0, "N", 29, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "re_user_name", context.getString(R.string.re_user_name), "Y", "Y", context.getString(R.string.re_user_name), "N", 0, 0, "N", 30, 0, "N", "", "", "", "");
        entityList.add(lobj);

        lobj = new FileFormat(id++, "EXPORT", seqno++, "re_loaction", context.getString(R.string.re_loaction), "Y", "Y", context.getString(R.string.re_loaction), "N", 0, 0, "N", 31, 0, "N", "", "", "", "");
        entityList.add(lobj);


        lobj = new FileFormat(id++, "EXPORT", seqno++, "re_dept_no", context.getString(R.string.re_dept_no), "Y", "Y", context.getString(R.string.re_dept_no), "N", 0, 0, "N",32, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORT", seqno++, "Type", context.getString(R.string.Type), "N", "Y", context.getString(R.string.Type), "N", 0, 0, "N",33, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORT", seqno++, "Org_Code", context.getString(R.string.export_Org_Code), "N", "Y", context.getString(R.string.export_Org_Code), "N", 0, 0, "N",34, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORT", seqno++, "UseFlag", context.getString(R.string.export_UseFlag), "N", "Y", context.getString(R.string.export_UseFlag), "N", 0, 0, "N",35, 0, "N", "", "", "", "");
        entityList.add(lobj);

        seqno = 1;
        lobj = new FileFormat(id++, "EXPORTOut", seqno++, "FILETYPE", "TXT", "Y", "Y", "TXT", "N", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORTOut", seqno++, "SEPARATER", ",", "Y", "Y", ",", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORTOut", seqno++, "HASTITLE", "Y", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORTOut", seqno++, "QUOTE", "", "Y", "Y", "", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORTOut", seqno++, "NUMBEREXCEPT", "N", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORTOut", seqno++, "ALLOWNULL", "N", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORTOut", seqno++, "FIXEDSEPARATER", "", "Y", "Y", "", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EXPORTOut", seqno++, "NUMBERDIGIT", "2", "Y", "Y", "2", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);

        return entityList;

    }



    public List<FileFormat> addImportData(){

        context=BaseApplication.getInstance().getApplicationContext();

        ArrayList<FileFormat> entityList = new ArrayList<FileFormat>();
        FileFormat lobj = null;
        //取决于export
        long id = 44;
        int seqno ;

        //操作员
        seqno = 1;
        lobj = new FileFormat(id++, "USER", seqno++, "user_no", context.getString(R.string.user_no), "Y", "Y", context.getString(R.string.user_no), "Y", 1, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "USER", seqno++, "user_name", context.getString(user_name), "Y", "Y", context.getString(user_name), "Y", 2, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "USER", seqno++, "user_password", context.getString(R.string.user_password), "Y", "Y", context.getString(R.string.user_password), "Y", 3, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "USER", seqno++, "remark", context.getString(R.string.user_remark), "Y", "Y", context.getString(R.string.user_remark), "Y", 4, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);

        seqno = 1;
        lobj = new FileFormat(id++, "USERIn", seqno++, "FILETYPE", "XLS", "Y", "Y", "XLS", "N", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "USERIn", seqno++, "SEPARATER", ",", "Y", "Y", ",", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "USERIn", seqno++, "HASTITLE", "Y", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "USERIn", seqno++, "SHEET_NO", "0", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);


        //部門
        seqno = 1;
        lobj = new FileFormat(id++, "DEPARTMENT", seqno++, "dep_no", context.getString(R.string.dep_no), "Y", "Y", context.getString(R.string.dep_no), "Y", 1, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "DEPARTMENT", seqno++, "dep_name", context.getString(R.string.dep_name), "Y", "Y", context.getString(R.string.dep_name), "Y", 2, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        //组织编号不可见
        lobj = new FileFormat(id++, "DEPARTMENT", seqno++, "Org_Code", context.getString(R.string.dep_Org_Code), "N", "Y", context.getString(R.string.dep_Org_Code), "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "DEPARTMENT", seqno++, "remark", context.getString(R.string.dep_remark), "Y", "Y", context.getString(R.string.dep_remark), "Y", 3, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);

        seqno = 1;
        lobj = new FileFormat(id++, "DEPARTMENTIn", seqno++, "FILETYPE", "XLS", "Y", "Y", "XLS", "N", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "DEPARTMENTIn", seqno++, "SEPARATER", ",", "Y", "Y", ",", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "DEPARTMENTIn", seqno++, "HASTITLE", "Y", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "DEPARTMENTIn", seqno++, "SHEET_NO", "0", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);


        //员工表
        seqno = 1;
        lobj = new FileFormat(id++, "EMPLOYEE", seqno++, "emp_no", context.getString(R.string.emp_no), "Y", "Y", context.getString(R.string.emp_no), "Y", 1, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EMPLOYEE", seqno++, "emp_name", context.getString(R.string.emp_name), "Y", "Y", context.getString(R.string.emp_name), "Y", 2, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EMPLOYEE", seqno++, "dep_no", context.getString(R.string.employ_dep_no), "Y", "Y", context.getString(R.string.employ_dep_no), "Y", 3, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EMPLOYEE", seqno++, "dep_name", context.getString(R.string.employ_dep_name), "Y", "Y", context.getString(R.string.employ_dep_name), "Y", 4, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EMPLOYEE", seqno++, "remark", context.getString(R.string.employ_remark), "Y", "Y", context.getString(R.string.employ_remark), "Y", 5, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);

        seqno = 1;
        lobj = new FileFormat(id++, "EMPLOYEEIn", seqno++, "FILETYPE", "XLS", "Y", "Y", "XLS", "N", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EMPLOYEEIn", seqno++, "SEPARATER", ",", "Y", "Y", ",", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EMPLOYEEIn", seqno++, "HASTITLE", "Y", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "EMPLOYEEIn", seqno++, "SHEET_NO", "0", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);


        //位置表
        seqno = 1;
        lobj = new FileFormat(id++, "LOCATION", seqno++, "loc_no", context.getString(R.string.loc_no), "Y", "Y", context.getString(R.string.loc_no), "Y", 1, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "LOCATION", seqno++, "loc_name", context.getString(R.string.loc_name), "Y", "Y", context.getString(R.string.loc_name), "Y", 2, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        //组织编号设置为不可见
        lobj = new FileFormat(id++, "LOCATION", seqno++, "Org_Code", context.getString(R.string.loc_Org_Code), "N", "Y", context.getString(R.string.loc_Org_Code), "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "LOCATION", seqno++, "remark", context.getString(R.string.loc_remark), "Y", "Y", context.getString(R.string.loc_remark), "Y", 3, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);


        seqno = 1;
        lobj = new FileFormat(id++, "LOCATIONIn", seqno++, "FILETYPE", "XLS", "Y", "Y", "XLS", "N", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "LOCATIONIn", seqno++, "SEPARATER", ",", "Y", "Y", ",", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "LOCATIONIn", seqno++, "HASTITLE", "Y", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "LOCATIONIn", seqno++, "SHEET_NO", "0", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);

        //固定资产表
        seqno = 1;
        lobj = new FileFormat(id++, "ASSET", seqno++, "Barcode", context.getString(R.string.Barcode), "Y", "Y", context.getString(R.string.Barcode), "Y", 1, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "Name", context.getString(R.string.Name), "Y", "Y", context.getString(R.string.Name), "Y", 2, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "spec", context.getString(R.string.spec), "Y", "Y", context.getString(R.string.spec), "Y", 3, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "unit", context.getString(R.string.unit), "Y", "Y", context.getString(R.string.unit), "Y", 4, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "class_no", context.getString(R.string.class_no), "Y", "Y", context.getString(R.string.class_no), "Y", 5, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "class_name", context.getString(R.string.class_name), "Y", "Y", context.getString(R.string.class_name), "Y", 6, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "brand_no", context.getString(R.string.brand_no), "Y", "Y", context.getString(R.string.brand_no), "Y", 7, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "brand_name", context.getString(R.string.brand_name), "Y", "Y", context.getString(R.string.brand_name), "Y", 8, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "supcust_no", context.getString(R.string.supcust_no), "Y", "Y", context.getString(R.string.supcust_no), "Y", 9, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "supcust_name", context.getString(R.string.supcust_name), "Y", "Y", context.getString(R.string.supcust_name), "Y", 10, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "dept_no", context.getString(R.string.asset_dept_no), "Y", "Y", context.getString(R.string.asset_dept_no), "Y", 11, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "dept_name", context.getString(R.string.asset_dept_name), "Y", "Y", context.getString(R.string.asset_dept_name), "Y", 12, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "user_no", context.getString(R.string.asset_user_no), "Y", "Y", context.getString(R.string.asset_user_no), "Y", 13, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "user_name", context.getString(R.string.asset_user_name), "Y", "Y", context.getString(R.string.asset_user_name), "Y", 14, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "location", context.getString(R.string.asset_location), "Y", "Y", context.getString(R.string.asset_location), "Y", 15, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "pay_date", context.getString(R.string.pay_date), "Y", "Y", context.getString(R.string.pay_date), "Y", 16, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "use_date", context.getString(R.string.use_date), "Y", "Y", context.getString(R.string.use_date), "Y", 17, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "retire_date", context.getString(R.string.retire_date), "Y", "Y", context.getString(R.string.retire_date), "Y", 18, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "pay_price", context.getString(R.string.pay_price), "Y", "Y", context.getString(R.string.pay_price), "Y", 19, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "now_price", context.getString(R.string.now_price), "Y", "Y", context.getString(R.string.now_price), "Y", 20, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "stock_qty", context.getString(R.string.stock_qty), "Y", "Y", context.getString(R.string.stock_qty), "Y", 21, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "period", context.getString(R.string.period), "Y", "Y", context.getString(R.string.period), "Y", 22, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "remark", context.getString(R.string.asset_remark), "Y", "Y", context.getString(R.string.asset_remark), "Y", 23, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "Type", context.getString(R.string.type), "N", "Y", context.getString(R.string.type), "Y", 24, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSET", seqno++, "Org_Code", context.getString(R.string.asset_Org_Code), "N", "Y", context.getString(R.string.asset_Org_Code), "Y", 25, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);


        seqno = 1;
        lobj = new FileFormat(id++, "ASSETIn", seqno++, "FILETYPE", "XLS", "Y", "Y", "XLS", "N", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSETIn", seqno++, "SEPARATER", ",", "Y", "Y", ",", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSETIn", seqno++, "HASTITLE", "Y", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        lobj = new FileFormat(id++, "ASSETIn", seqno++, "SHEET_NO", "0", "Y", "Y", "N", "Y", 0, 0, "N", 0, 0, "N", "", "", "", "");
        entityList.add(lobj);
        return entityList;

    }


    String getString(int ResID){
        return context.getString(ResID);
    }

}
